package com.example.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.pojo.Xiaoquecx;
import com.example.service.XiaoquecxService;

@RestController
@RequestMapping("xiaoquecx")
public class XiaoquecxController {
@Autowired
XiaoquecxService service;
//分页查询
@RequestMapping("findall/{page}/{size}")
public Page<Xiaoquecx> findall(@PathVariable("page") Integer page,@PathVariable("size") Integer size){
	 Pageable pageable=PageRequest.of(page-1, size);
	return service.findall(pageable);
	}
//模糊查询
public List<Xiaoquecx> mohufind(Integer rwid,String rwzt,String qxlx,String qxjb,String gzdj,String xfdate){
	return service.mohufind(rwid, rwzt, qxlx, qxjb, gzdj, xfdate);

}
}
